#include "main/utils.h"
using namespace std;

class Solution {
public:
    int exchangeBits(int num) {
      return ((num & 0x55555555) << 1) | ((num & 0xaaaaaaaa) >> 1);
    }
};

int main() {
  Solution su;
  cout << su.exchangeBits(2) << endl;
  cout << su.exchangeBits(3) << endl;

  return 0;
}
